Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syslog.py: report when ceph works are stuck #1945

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lxbsz
Copy link
Member

@lxbsz lxbsz commented May 23, 2024

Usually there will be performance bug when hitting the works are stuck:

workqueue: delayed_work [ceph] hogged CPU for >10000us 4 times, consider switching to WQ_UNBOUND

URL: https://www.spinics.net/lists/ceph-users/msg78775.html

@@ -107,7 +107,7 @@ def syslog(ctx, config):
stdout = rem.sh(
[
'egrep', '--binary-files=text',
'\\bBUG\\b|\\bINFO\\b|\\bDEADLOCK\\b',
'\\bBUG\\b|\\bINFO\\b|\\bDEADLOCK\\b|\\bceph\\b.*\\bWQ_UNBOUND\\b',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Sun Sep 10 07:19:00 2023] workqueue: delayed_work [ceph] hogged CPU for >10000us 4 times, consider switching to WQ_UNBOUND
[Sun Sep 10 08:41:24 2023] workqueue: ceph_con_workfn [libceph] hogged CPU for >10000us 4 times, consider switching to WQ_UNBOUND

This regex would match only the first message (ceph), but not the second (libceph).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I wouldn't cling to WQ_UNBOUND -- it's an implementation detail that could change. If the concern is work items taking longer than expected to run, it would probably be better to match on "workqueue: ... hogged CPU for ...".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Sun Sep 10 07:19:00 2023] workqueue: delayed_work [ceph] hogged CPU for >10000us 4 times, consider switching to WQ_UNBOUND
[Sun Sep 10 08:41:24 2023] workqueue: ceph_con_workfn [libceph] hogged CPU for >10000us 4 times, consider switching to WQ_UNBOUND

This regex would match only the first message (ceph), but not the second (libceph).

Okay, let me run the test again.

Also, I wouldn't cling to WQ_UNBOUND -- it's an implementation detail that could change. If the concern is work items taking longer than expected to run, it would probably be better to match on "workqueue: ... hogged CPU for ...".

I just want to match the ceph ones, this will match all the possible warnings, is that okay ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want to match the ceph ones

That is totally fine -- I just wanted to say that we shouldn't be matching on name of the internal flag.

@idryomov
Copy link
Contributor

idryomov commented May 23, 2024

Usually there will be performance bug when hitting the works are stuck:

workqueue: delayed_work [ceph] hogged CPU for >10000us 4 times, consider switching to WQ_UNBOUND

This doesn't mean that the work item is stuck -- just that it's taking longer than a configurable threshold.

BTW WQ_UNBOUND is not a universal cure either -- it can lead to higher latencies:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c25da5b7baf1d243e6612ba2b97e2a2c4a1376f6
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f959325e6ac3f499450088b8d9c626d1177be160

@lxbsz
Copy link
Member Author

lxbsz commented May 28, 2024

Usually there will be performance bug when hitting the works are stuck:
workqueue: delayed_work [ceph] hogged CPU for >10000us 4 times, consider switching to WQ_UNBOUND

This doesn't mean that the work item is stuck -- just that it's taking longer than a configurable threshold.

BTW WQ_UNBOUND is not a universal cure either -- it can lead to higher latencies:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c25da5b7baf1d243e6612ba2b97e2a2c4a1376f6 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f959325e6ac3f499450088b8d9c626d1177be160

Yeah, you are right. Just this warning could give us a hint that this code could be improved.

Usually there will be performance bug when hitting the works are
stuck:

workqueue: delayed_work [ceph] hogged CPU for >10000us 4 times, consider switching to WQ_UNBOUND

URL: https://www.spinics.net/lists/ceph-users/msg78775.html
Signed-off-by: Xiubo Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants